<template>
  <a-modal
    title="教师导入冲突列表"
    :width="1200"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleCancel"
    @cancel="handleCancel"
    :footer="null"
  >
    <div>
      <a-card :bordered="false">
        <a-table
          bordered
          ref="table"
          :columns="columns"
          :dataSource="loadData"
          :loading="tableLoading"
          :pagination="false"
          :rowKey="(record) => record.account"
        >
          <span slot="message" slot-scope="text, record">
            <a-tag color='red'>
              {{text}}
            </a-tag>
          </span>
        </a-table>
      </a-card>
    </div>
  </a-modal>

</template>

<script>
  import { tStudentTagList } from '@/api/modular/system/studentTagManage'
  import { getCourseSelectionDetailList } from '@/api/modular/system/courseSelectionManage'

  export default {
    data() {
      return {
        visible: false,
        confirmLoading: false,
        columns: [
          {
            title: '账号',
            dataIndex: 'account'
          },
          {
            title: '工号',
            dataIndex: 'userNum'
          },
          {
            title: '姓名',
            dataIndex: 'name'
          },
          {
            title: '手机号',
            dataIndex: 'phone'
          },
          {
            title: '错误原因',
            dataIndex: 'message',
            scopedSlots: { customRender: 'message' }
          }
        ],
        loadData: '',
        tableLoading: false
      }
    },
    methods: {
      handleCancel() {
        this.visible = false
      },
      open(record) {
        this.visible = true
        this.loadData = record
      }
    }
  }
</script>